<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件冒泡相关</title>
    <script src="../static/vue.min.js"></script>
    <script src="../static/jquery.js"></script>
</head>
<body>
    <div class="parent">
        <div class="child" style="width: 100px;height: 100px;background: red"></div>
    </div>
    <script>
        $(".parent").click(function () {
            alert("parent")
        })
        $(".child").click(function (event) {
            alert("child")
            event.stopPropagation();
        })
    </script>
</body>
</html>